package com.liuyanzhao.blog.entity;

import java.util.Date;

public class Comment {
    private Integer commentId;

    private Integer commentPid;

    private String commentPname;

    private Integer commentArticleId;

    private String commentAuthorName;

    private String commentAuthorEmail;

    private String commentAuthorUrl;

    private String commentContent;

    private String commentAgent;

    private String commentIp;

    private Date commentCreateTime;

    private Integer commentRole;

    private Integer commentStatus;

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public Integer getCommentPid() {
        return commentPid;
    }

    public void setCommentPid(Integer commentPid) {
        this.commentPid = commentPid;
    }

    public String getCommentPname() {
        return commentPname;
    }

    public void setCommentPname(String commentPname) {
        this.commentPname = commentPname == null ? null : commentPname.trim();
    }

    public Integer getCommentArticleId() {
        return commentArticleId;
    }

    public void setCommentArticleId(Integer commentArticleId) {
        this.commentArticleId = commentArticleId;
    }

    public String getCommentAuthorName() {
        return commentAuthorName;
    }

    public void setCommentAuthorName(String commentAuthorName) {
        this.commentAuthorName = commentAuthorName == null ? null : commentAuthorName.trim();
    }

    public String getCommentAuthorEmail() {
        return commentAuthorEmail;
    }

    public void setCommentAuthorEmail(String commentAuthorEmail) {
        this.commentAuthorEmail = commentAuthorEmail == null ? null : commentAuthorEmail.trim();
    }

    public String getCommentAuthorUrl() {
        return commentAuthorUrl;
    }

    public void setCommentAuthorUrl(String commentAuthorUrl) {
        this.commentAuthorUrl = commentAuthorUrl == null ? null : commentAuthorUrl.trim();
    }

    public String getCommentContent() {
        return commentContent;
    }

    public void setCommentContent(String commentContent) {
        this.commentContent = commentContent == null ? null : commentContent.trim();
    }

    public String getCommentAgent() {
        return commentAgent;
    }

    public void setCommentAgent(String commentAgent) {
        this.commentAgent = commentAgent == null ? null : commentAgent.trim();
    }

    public String getCommentIp() {
        return commentIp;
    }

    public void setCommentIp(String commentIp) {
        this.commentIp = commentIp == null ? null : commentIp.trim();
    }

    public Date getCommentCreateTime() {
        return commentCreateTime;
    }

    public void setCommentCreateTime(Date commentCreateTime) {
        this.commentCreateTime = commentCreateTime;
    }

    public Integer getCommentRole() {
        return commentRole;
    }

    public void setCommentRole(Integer commentRole) {
        this.commentRole = commentRole;
    }

    public Integer getCommentStatus() {
        return commentStatus;
    }

    public void setCommentStatus(Integer commentStatus) {
        this.commentStatus = commentStatus;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((commentAgent == null) ? 0 : commentAgent.hashCode());
		result = prime * result + ((commentArticleId == null) ? 0 : commentArticleId.hashCode());
		result = prime * result + ((commentAuthorEmail == null) ? 0 : commentAuthorEmail.hashCode());
		result = prime * result + ((commentAuthorName == null) ? 0 : commentAuthorName.hashCode());
		result = prime * result + ((commentAuthorUrl == null) ? 0 : commentAuthorUrl.hashCode());
		result = prime * result + ((commentContent == null) ? 0 : commentContent.hashCode());
		result = prime * result + ((commentCreateTime == null) ? 0 : commentCreateTime.hashCode());
		result = prime * result + ((commentId == null) ? 0 : commentId.hashCode());
		result = prime * result + ((commentIp == null) ? 0 : commentIp.hashCode());
		result = prime * result + ((commentPid == null) ? 0 : commentPid.hashCode());
		result = prime * result + ((commentPname == null) ? 0 : commentPname.hashCode());
		result = prime * result + ((commentRole == null) ? 0 : commentRole.hashCode());
		result = prime * result + ((commentStatus == null) ? 0 : commentStatus.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Comment other = (Comment) obj;
		if (commentAgent == null) {
			if (other.commentAgent != null)
				return false;
		} else if (!commentAgent.equals(other.commentAgent))
			return false;
		if (commentArticleId == null) {
			if (other.commentArticleId != null)
				return false;
		} else if (!commentArticleId.equals(other.commentArticleId))
			return false;
		if (commentAuthorEmail == null) {
			if (other.commentAuthorEmail != null)
				return false;
		} else if (!commentAuthorEmail.equals(other.commentAuthorEmail))
			return false;
		if (commentAuthorName == null) {
			if (other.commentAuthorName != null)
				return false;
		} else if (!commentAuthorName.equals(other.commentAuthorName))
			return false;
		if (commentAuthorUrl == null) {
			if (other.commentAuthorUrl != null)
				return false;
		} else if (!commentAuthorUrl.equals(other.commentAuthorUrl))
			return false;
		if (commentContent == null) {
			if (other.commentContent != null)
				return false;
		} else if (!commentContent.equals(other.commentContent))
			return false;
		if (commentCreateTime == null) {
			if (other.commentCreateTime != null)
				return false;
		} else if (!commentCreateTime.equals(other.commentCreateTime))
			return false;
		if (commentId == null) {
			if (other.commentId != null)
				return false;
		} else if (!commentId.equals(other.commentId))
			return false;
		if (commentIp == null) {
			if (other.commentIp != null)
				return false;
		} else if (!commentIp.equals(other.commentIp))
			return false;
		if (commentPid == null) {
			if (other.commentPid != null)
				return false;
		} else if (!commentPid.equals(other.commentPid))
			return false;
		if (commentPname == null) {
			if (other.commentPname != null)
				return false;
		} else if (!commentPname.equals(other.commentPname))
			return false;
		if (commentRole == null) {
			if (other.commentRole != null)
				return false;
		} else if (!commentRole.equals(other.commentRole))
			return false;
		if (commentStatus == null) {
			if (other.commentStatus != null)
				return false;
		} else if (!commentStatus.equals(other.commentStatus))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Comment [commentId=" + commentId + ", commentPid=" + commentPid + ", commentPname=" + commentPname
				+ ", commentArticleId=" + commentArticleId + ", commentAuthorName=" + commentAuthorName
				+ ", commentAuthorEmail=" + commentAuthorEmail + ", commentAuthorUrl=" + commentAuthorUrl
				+ ", commentContent=" + commentContent + ", commentAgent=" + commentAgent + ", commentIp=" + commentIp
				+ ", commentCreateTime=" + commentCreateTime + ", commentRole=" + commentRole + ", commentStatus="
				+ commentStatus + "]";
	}
    
    
    
    
}